Skip to content

impl HttpError::new_boxed to provide user with ability to ctor from already boxed error#789

Merged
alamb merged 1 commit into
apache:mainfrom
DoumanAsh:error_alt_ctor
Jul 9, 2026
Merged

impl HttpError::new_boxed to provide user with ability to ctor from already boxed error#789
alamb merged 1 commit into
apache:mainfrom
DoumanAsh:error_alt_ctor

Conversation

@DoumanAsh

@DoumanAsh DoumanAsh commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

None, it is minor improvement to API

Rationale for this change

I would like to be able to created HttpError from already boxed error for my alternative HTTP client implementation
Otherwise I need to wrap boxed error into new type

What changes are included in this PR?

Introduces new method to HttpError to create error from boxed dyn std::error::Error

Are there any user-facing changes?

New public method on HttpError
No breaking changes

@DoumanAsh DoumanAsh changed the title impl HttpError::new_boxed to provide user with ability to ctor from a… impl HttpError::new_boxed to provide user with ability to ctor from aready boxed error Jul 4, 2026

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a nice improvement to me -- thank you @DoumanAsh

@alamb
alamb merged commit 18102f3 into apache:main Jul 9, 2026
9 checks passed
@alamb alamb changed the title impl HttpError::new_boxed to provide user with ability to ctor from aready boxed error impl HttpError::new_boxed to provide user with ability to ctor from already boxed error Jul 9, 2026
@DoumanAsh
DoumanAsh deleted the error_alt_ctor branch July 9, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants